<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonList.jsp"%>
<%@ include file="/commons/commonEdit.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="${ctx}/styles/show.css" rel="stylesheet" type="text/css">

<title>${key.maintenance_meter}

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp

;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs

p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb

sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n

bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&

nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</title>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript" src="${ctx }/scripts/ajaxException.js"></script>
<script type="text/javascript" src="${ctx }/scripts/common/prototype.js"></script>
<script type="text/javascript">

 	var meterId="";
 	var currentFlat="";
 	var houseId="";

	function openMeterRadixEdit(){
       var url = "${ctx}/house_meterAction.do?method=initMeterRadixEdit&meterId="+meterId;
	   top.windowOpen(url, "meterRadixEdit", "${修改底数}", 180, 750,true,"meterListPage");
   	}

   	function openMeterInstead(){
		url = "${ctx}/house_meterAction.do?method=checkTheHouseIsInGoout&houseId="+houseId;
		new Ajax.Request(url,{
		 method:'post',
		 onSuccess:doMeterInstead
		})
   	}

   	function doMeterInstead(response){
	   ajaxSubmitException(response.responseText);
       var url = "${ctx}/house_meterAction.do?method=initMeterInstead&meterId="+meterId;
	   top.windowOpen(url, "meterInstead", "${更换走表}", 350, 750,true,"meterListPage");

   	}


   	function setCurrentMeterId(currentId,tempFlat,houseId){
   		this.meterId=currentId;
   		this.currentFlat=tempFlat;
   		this.houseId=houseId;

   	}

	function flush(){
		window.location.href="${ctx}/house_meterAction.do?method=initMeterMaintenanceList&houseId=${houseId}";
		//window.location.reload();
	}

	function getMenu(event){
	if(currentFlat==0){
	 HideContextMenu('quick_rightmenu');event.returnValue = false;event.cancelBubble = true;return false;}
	ShowContextMenu(event,'quick_rightmenu');
	}
</script>
</head>

<body onKeyDown="CommonKey()";oncontextmenu="return HideContextMenu_right()">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle"> <span

class="window_head_intext">${key.maintenance_meter}</span></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td class="aux_header_line_2"></td>
  </tr>
  <tr>
    <td valign="middle" class="content">
  <div  class="tab_bgline">
<div style="overflow:auto; height:455px;">
  <ec:ceTable items="houseMeterList"
	action="${ctx}/house_meterAction.do?method=initMeterMaintenanceList"
	var="houseMeter"
	view="pmsview"
	styleClass="gridData2"
	rowsDisplayed="5" >
	<ec:ceRow styleClass="grid"  onclick="setCurrentMeterId('${houseMeter.keyword}','${houseMeter.validity}','${houseId}');" onContextMenu="getMenu(event);">
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.meter_type}" property="meterTypeName" sortable="false" width="8%" />
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.meter_name}" property="name" sortable="false" width="8%"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.meter_base}" property="base" sortable="false" width="9%" />
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.meter_validity}" property="validity" width="9%">
		<c:if test="${houseMeter.validity==1}">有效
		</c:if>
		<c:if test="${houseMeter.validity==0}">无效
		</c:if>
		</ec:ceColumn>
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.meter_lastNumer}" property="lastNumer" sortable="false" width="11%"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.meter_changesNumer}" property="changesNumer" sortable="false" width="9%"/>
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.meter_current_Dosage}" property="currentDosage" sortable="false" width="11%"/>
		<ec:parameter name="houseId" value="${houseId}"></ec:parameter>
	</ec:ceRow>
</ec:ceTable>
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
     <td class="window_footer">
        <table border="0" align="right" cellpadding="0" cellspacing="0">
         <tr>
            <td class="btn_between_space"></td>
            <td>
              <table border="0" cellpadding="0" cellspacing="0">
               <tr>
                 <td class="buttonOffLeft" id="btn1_31"></td>
                 <td class="buttonOffMiddle" id="btn1_32" onblur="btn_change(3)" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)" onClick="windowClose();"><img src="${ctx}/images/ico_cancel.gif" border="0" align="absmiddle" /> ${key.close}</td>
                 <td class="buttonOffRight" id="btn1_33"></td>
              </tr>
             </table>
           </td>
         </tr>
       </table>
     </td>
  </tr>
</table>
</div>
                                  </td>
                        </tr>
      </table>


    </td>
  </tr>

</table>


</div>
<div id="quick_rightmenu" style="display:none;"  oncontextmenu="return false" class="quick_rightmenu"onMouseOver="MM_showHideLayers('quick_rightmenu')"  onMouseOut="MM_showHideLayers('quick_rightmenu')">
<table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg">
	<tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
     	  <tr>
		   <td class="hrpading"></td>
          </tr>
            <tr>
		  <td class="quickMenu_toolbarico"><a href="#"  onclick="openMeterInstead();"onfocus="this.blur()"><img src="${ctx}/images/ico_biao_edit.gif" border="0" align="absbottom" alt="更换走表"/>&nbsp;${key.instead_meter}</a></td>
          </tr>
          <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onclick="openMeterRadixEdit();"onfocus="this.blur()"><img src="${ctx}/images/ico_biao_gh.gif" border="0" align="absbottom" alt="修改底数"/> ${key.edit_meter_radix}</a></td>
          </tr>

      </table></td>
    </tr>
  </table>
</div>
</body>
</html>